﻿using System.ComponentModel;
using System.Runtime.Serialization;


namespace WcfService1.DTO
{
     [DataContract]
    public class DepartemenDTO : INotifyPropertyChanged
    {
        private string _Code;
        private string _Name;
        private int _No;


          [DataMember]
        public string Code
        {
            get { return _Code; }
            set
            {
                if (Code != value)
                    _Code = value;
                RaisePropertyChanged("Code");
            }
        }


          [DataMember]
        public string Name
        {
            get { return _Name; }
            set
            {
                if (Name != value)
                    _Name = value;
                RaisePropertyChanged("Name");
            }
        }

        public int No
        {
            get { return _No; }
            set
            {
                _No = value;
                RaisePropertyChanged("No");
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        protected void RaisePropertyChanged(string propertyname)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
                handler(this, new PropertyChangedEventArgs(propertyname));
        }
    }
}
